import request from '@/utils/request'
// 获取商品类型信息
export function getShangpinleixing(params) {
  return request({
    url: `/api/vm-service/skuClass/search`,
    method: 'get',
    params
  })
}
// 新建商品类型
export function POSTshangpinleixing(data) {
  return request({
    url: `/api/vm-service/skuClass`,
    method: 'POST',
    data
  })
}
// 修改商品类型  /api/vm-service/skuClass/:classId
export function PUTshangpinleixing(data, classId) {
  return request({
    url: `/api/vm-service/skuClass/${classId}`,
    method: 'PUT',
    data
  })
}
// 删除商品类型   /api/vm-service/skuClass/:classId
export function DELETEshangpinleixing(classId) {
  return request({
    url: `/api/vm-service/skuClass/${classId}`,
    method: 'DELETE'
  })
}
// 商品搜索  /api/vm-service/sku/search
export function GETshangpin(params) {
  return request({
    url: `/api/vm-service/sku/search`,
    method: 'GET',
    params
  })
}
// 新增商品 /api/vm-service/sku
export function POSTshangpin(data) {
  return request({
    url: `/api/vm-service/sku`,
    method: 'POST',
    data
  })
}
// 修改商品类型  /api/vm-service/skuClass/:classId
export function PUTshangpin(data, skuId) {
  return request({
    url: `/api/vm-service/sku/${skuId}`,
    method: 'PUT',
    data
  })
}
